import React from 'react';
import {inject, observer} from 'mobx-react';
import base from "../../util/base";
import { Checkbox, Modal, Radio } from 'weaver-mobile'
import { getLabel } from './../../util/common';
const AgreeItem = Checkbox.AgreeItem;

@observer
export default class Main extends React.Component {
    constructor(props) {
        super(props);
    }
    render() {
        const { variableMap } = base.wfGlobalStore;
        let radioChecked = variableMap.has("PDFSign_radioChecked") ? variableMap.get("PDFSign_radioChecked") : 0;
        return (
            < div >
                <AgreeItem
                    defaultChecked
                    checked={radioChecked == 0 ? true : false}
                    onChange={() => this.onCheckBoxChange(0)}
                ><span>{getLabel(511302,"替换原文件")}</span>
                </AgreeItem>
                <AgreeItem
                    checked={radioChecked == 1 ? true : false}
                    onChange={() => this.onCheckBoxChange(1)}
                ><span>{getLabel(511303,"存为签字意见附件")}</span>
                </AgreeItem>
            </div >

        )
    }
    
    onCheckBoxChange = (val) => {
        base.wfGlobalStore.controlVariableMap("PDFSign_radioChecked", val );
    }
}